home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DIAGTOOL / X10XA2.ZIP;1 / DEMO.CMD < prev    next >
Encoding:
Text File  |  1994-08-14  |  20.4 KB  |  672 lines

  1. DISPLAY OFF
  2. ˇ
  3. ˇW A R N I N G:
  4. ˇ========================================
  5. ˇPlease don't alter this file. 
  6.  
  7. ˇAlso, don't copy statements from this file for programming your own 
  8. ˇcommand files. Special characters have been embedded which may cause
  9. ˇerratic behavior in your command files.
  10.  
  11. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. ˇ                        Welcome to the XA demo!
  25.  
  26. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  27. ˇ This quick tour will highlight many of the features of XA.  To get
  28. ˇ the most power from XA, please read the User's Guide (XA_203.TXT). 
  29.  
  30. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  31. ˇ Features of XA Version 2.3
  32.  
  33. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  34. ˇ   * Sends DIRECT (immediate) and EVENT (scheduled) X10 commands via 
  35. ˇ       DOS prompt, batch file, or command file.
  36. ˇ   * User configurable - Works with any COM port (interrupt or polled mode).
  37. ˇ   * Automatic and complete CP-290 schedule maintenance.
  38. ˇ   * Sunrise and Sunset calculations, automatic DST adjustments.
  39. ˇ   * Synchronization of the CP-290 or PC onboard clocks.
  40. ˇ   * Program an event to occur any DATE in the future.
  41. ˇ   * Repeat events every 'n' days.
  42. ˇ   * PowerFail Recovery, restores modules to programmed state.
  43. ˇ   * Interface to external conditions via I/O ports.
  44. ˇ   * Monitoring and logging CP-290 activity.
  45. ˇ   * Powerful programming language (IF/ELSE, variables, logic operations,
  46. ˇ       GOTO, GOSUB/RETURN, INPORT/OUTPORT)
  47.  
  48. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  49. ˇ  XA is copyrighted 1991-1994 by Bruce Christensen. All Rights Reserved.
  50. pause
  51.  
  52. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. ˇ What is XA?
  63.  
  64. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  65. ˇ XA is a command interpreter for the CP-290, X10's Computer Interface.
  66. ˇ The XA interpreter translates English-like sentences into commands that
  67. ˇ are understood by the CP-290.  XA parses commands from a variety of inputs.
  68. ˇ XA can read commands from the DOS prompt.  The following example turns
  69. ˇ on an X10 module whose address is set at House A Unit 9:
  70.  
  71. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  72. ˇ       C:\> XA "A9 ON"
  73. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  74.  
  75. ˇ  You can embed X10 commands within batch files too:
  76. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  77.  
  78. ˇ       PHONE.BAT:
  79. ˇ            XA "A9 ON"
  80. ˇ            CALL PRODIGY
  81. ˇ            XA "A9 OFF"
  82. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  83.  
  84. ˇ  X10 commands entered from the DOS prompt or batch file must be enclosed in
  85. ˇ  "quotation marks".  Multiple X10 commands may be entered, they must be
  86. ˇ  separated by "quotations" too.
  87.  
  88. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  89. ˇ       C:\> XA "A9 ON" "A10 OFF" "C3 DIM 50"
  90. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  91. pause
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. ˇ
  101.  
  102.  
  103. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  104. ˇ Command Files
  105. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  106. ˇ
  107. ˇ Another input for X10 statements is the command file (*.CMD).  This file
  108. ˇ can hold an unlimited number of commands that are executed sequentially
  109. ˇ by XA.  For instance, you can create a "script" of X10 commands to control
  110. ˇ Christmas lights.  You tell XA which file to read as follows:
  111.  
  112. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  113. ˇ       C:\> XA F=XMAS.CMD
  114. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  115. ˇ 
  116. ˇ where XMAS.CMD contains the following commands:
  117.  
  118. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  119. ˇ            A1 DIM 
  120. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  121. ˇ            A2 BRIGHT 
  122. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  123. ˇ            A3 OFF
  124. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  125. ˇ            A4 ON
  126. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  127. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  128.  
  129. ˇ XA offers many special commands that allow you to create very sophisticated
  130. ˇ script files.  Some of these commands include:
  131. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  132. ˇ            IF/ELSE/ENDIF, GOTO, GOSUB/RETURN, 
  133. ˇ                  PAUSE, DELAY secs, TIMER secs,  ...plus many others. 
  134.  
  135. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  136. ˇ See the User's Manual for complete details.
  137. pause
  138.  
  139.  
  140.  
  141.  
  142.  
  143. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  144. ˇ Event Scheduling
  145. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  146.  
  147.  
  148.  
  149.  
  150. ˇ While XA is great for sending immediate commands to your CP-290, XA really
  151. ˇ excels at scheduling and maintaining events. Events are X10 commands stored
  152. ˇ in the CP-290's memory and activated at some future time.  As with direct
  153. ˇ commands, events may be programmed from the DOS prompt:
  154.  
  155. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  156. ˇ     C:\> XA "A9 ON TIME 8:00 PM WEEKDAYS"
  157. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  158.  
  159. ˇ Event statements are usually stored in command files.  A command file may 
  160. ˇ contain your entire X10 event schedule.  You can have XA download your 
  161. ˇ complete schedule for you automatically.  If you control your personal
  162. ˇ computer with an X10 Appliance Module, then you can have XA perform 
  163. ˇ automatic event downloads on a weekly basis.  See the section entitled
  164. ˇ "POWERUP Utility" in the User's Guide for complete details.
  165.  
  166.  
  167. pause
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180. ˇThe following is an example of an X10 event file called XA.CMD:
  181.  
  182. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  183. ˇ       C:\> XA F=XA.CMD
  184.  
  185. ˇ               :
  186. ˇ           PORCH_LIGHTS ON SUNSET EVERYDAY
  187. ˇ           PORCH_LIGHTS OFF SUNRISE EVERYDAY
  188. ˇ           DECK_LIGHTS ON DUSK DATE 5/1 THRU 9/30 WEEKDAYS
  189. ˇ               :
  190.  
  191. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  192. ˇ Notice how more descriptive names may be substituted for module 
  193. ˇ house and unit codes.  PORCH_LIGHTS have been "DEFINED" (or substituted) 
  194. ˇ for the module address House A Unit 9.  
  195.   
  196. ˇ XA supports dynamic instances such as sunrise and sunset.  These times 
  197. ˇ are calculated based on your latitude and longitude.  
  198.   
  199. ˇ XA is also capable of evaluating dates and storing an event when the 
  200. ˇ statement meets the proper criteria. XA allows you to program an event 
  201. ˇ weeks, months, or years into the future.
  202.  
  203.  
  204. pause
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  216. ˇ Configurable Communications
  217. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  218.  
  219.  
  220. ˇ XA supports COM1 through COM4 using either interrupt-driven (preferred mode)
  221. ˇ or polled communications.  A utility program called FINDX10 is included which
  222. ˇ will analyze your installed COM ports and search for the CP-290.  
  223.  
  224. ˇ IMPORTANT NOTE:  FINDX10 only works in a true DOS environment. 
  225. ˇ                  FINDX10 may not be able to locate the CP-290 if you are
  226. ˇ                  running WINDOWS. 
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. ˇ 
  234. ˇ To run FINDX10...
  235.  
  236. pause
  237.  
  238.  
  239.  
  240.  
  241.  
  242. DOS FINDX10 !
  243. ˇ
  244. ˇ If the last message reads: 
  245. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  246. ˇ         "Found CP-290 at COMx. Use IO xxx IRQ xxx" 
  247. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  248. ˇ    then you're in luck. XA should work on your PC without any problems.
  249. ˇ    Note: You will be instructed to run FINDX10 later to setup XA's
  250. ˇ          initialization file (XA.INI).
  251. ˇ
  252. ˇ If the last message reads: 
  253. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  254. ˇ           "Can not locate the CP-290..." 
  255. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  256. ˇ    you may have problems running XA. Later on, try connecting the CP-290
  257. ˇ    to a different COM port and then run FINDX10 again. If you are running
  258. ˇ    Windows, you will need to exit Windows (press ALT-F4), then run 
  259. ˇ    FINDX10 again.
  260. pause
  261. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  274. ˇ Initialization File (XA.INI)
  275. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  276.  
  277. ˇ In addition to using command files, XA also reads a file called XA.INI. This
  278. ˇ is an initialization file where you store XA statements that describe the 
  279. ˇ setup of your machine. For instance, the IO and IRQ tokens that FINDX10 
  280. ˇ suggested to you should be placed in this file. Here is a sample of other
  281. ˇ XA tokens that would normally appear in XA.INI:
  282.  
  283. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  284. ˇ       DEFINE PORCH_LIGHTS HOUSE A UNIT 9 
  285. ˇ       DEFINE DECK_LIGHTS HOUSE A UNIT 1
  286.  
  287. ˇ       LATITUDE  41¯35'                   # Coordinates of
  288. ˇ       LONGITUDE 81¯20'                   # Mentor, Ohio
  289. ˇ       TIMEZONE 5 DST                     # used for Sunrise/sunset calcs
  290.  
  291. ˇ       COM3                               # For "standard" COM configurations
  292. ˇ       IO 3E8H                            # For "special"...
  293. ˇ       IRQ 5                              # ... COM configurations
  294.  
  295. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  296. ˇ A sample XA.INI is included with this software. You can modify it to suit 
  297. ˇ your configuration. Also, the User's Guide contains complete information
  298. ˇ about "tokens" and the initialization file. Please read it!
  299. pause
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  307. ˇ Powerfail Recovery
  308. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  309.  
  310. ˇ XA can be used to restore all CP-290 controlled modules back to their 
  311. ˇ programmed state in the event of a power failure, or other circumstance. 
  312. ˇ The proper state is determined by examining the CP-290's event schedule. 
  313.  
  314. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  315. ˇ   C:\> XA -p
  316.  
  317. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  318. ˇ      Powerfail Recovery. Checking status...
  319. DISPLAY OFF VIDEO6 YELLOW BLUE DELAY 0:0:1 DISPLAY ON
  320. ˇ      Restoring: PORCH_LIGHTS ON
  321. ˇ      Restoring: DECK_LIGHTS OFF
  322. ˇ      Ignoring : DEHUMIDIFIER
  323. ˇ      Forcing  : HALL_LIGHTS ON
  324. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  325.  
  326. ˇ XA allows selected modules (DEHUMIDIFIER) to be excluded from recovery,
  327. ˇ others (HALL_LIGHTS) can forced to a particular state no matter what XA 
  328. ˇ determines. 
  329.  
  330.  
  331. pause
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  339. ˇ Special DATE handling
  340. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  341.  
  342. ˇ Events can be programmed to occur on specific dates or between a range of 
  343. ˇ dates. Events can also be excluded from occuring on specific (or range of) 
  344. ˇ dates. The following examples show how you can control lighting during 
  345. ˇ specific dates. 
  346.   
  347. ˇ Turn on flagpole light on July 4:
  348. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  349. ˇ     FLAGPOLE ON SUNSET DATE 7/4
  350. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  351.  
  352. ˇ Turn on flagpole on multiple holidays:
  353. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  354. ˇ     FLAGPOLE ON SUNSET DATE 5/31 DATE 7/4 DATE 9/6
  355. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  356.  
  357. ˇ Turn on porch lights only during the winter season:
  358. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  359. ˇ     PORCH_LIGHTS ON TIME 5:30 DATE 11/1/93 THRU 3/31/94 WEEKDAYS
  360. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  361.  
  362. ˇ Turn on porch lights EXCEPT during certain holidays:
  363. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  364. ˇ     PORCH_LIGHTS ON TIME SUNSET EXCEPT DATE 5/31 DATE 7/4 DATE 9/6 WEEKDAYS
  365. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  366.  
  367. ˇ Turn on deck lights during summer EXCEPT during vacation:
  368. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  369. ˇ     DECK_LIGHTS ON TIME SUNSET DATE 4/1 THRU 9/30 EXCEPT DATE 7/1 THRU 7/14
  370. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  371.  
  372. pause
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  380. ˇ Report Generation
  381. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  382.  
  383. ˇ XA can produce report files (XA.RPT) of your X10 schedule in (2) special 
  384. ˇ formats. The first style lists events sorted by day and time:
  385.  
  386. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  387. ˇ Saturday - January 01, 1994       Sunrise:  7:52:05      Sunset:  5:05:09           
  388.  
  389. ˇ    Time      Cmd    Mode         Module Address/Description           Event 
  390. ˇ  --------    ---  --------       ----------------------------------   ------
  391. ˇ  12:30 am    OFF                 (A8) LIVING_ROOM_LAMP                ( 41) 
  392. ˇ  12:30 am    OFF                 (A4) FAMILY_ROOM_LAMP                ( 43) 
  393. ˇ   1:30 am    OFF                 (A3) BEDROOM_LIGHT                   ( 54) 
  394. ˇ   6:00 am    ON                  (B2) DEHUMIDIFIER                    ( 56)*
  395. ˇ   7:22 am    OFF                 (H1) STAIRS                          ( 63)*
  396. ˇ   7:22 am    OFF                 (H2) HALLWAY                         ( 63)*
  397. ˇ  12:00 pm    OFF                 (B2) DEHUMIDIFIER                    ( 57)*
  398. ˇ   4:05 pm    ON                  (A4) FAMILY_ROOM_LAMP                ( 51) 
  399. ˇ   4:56 pm    ON                  (B2) DEHUMIDIFIER                    ( 58)*
  400. ˇ   5:05 pm    DIM                 (A6) OUTSIDE_PORCH_LIGHTS            ( 48) 
  401. ˇ   5:06 pm    DIM                 (H1) STAIRS                          ( 61)*
  402. ˇ   5:06 pm    DIM                 (H2) HALLWAY                         ( 60)*
  403. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  404.  
  405. pause
  406.  
  407.  
  408. ˇ The second style lists events sorted by day, module, and time:
  409.  
  410.  
  411. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  412. ˇ Saturday - January 01, 1994       Sunrise:  7:52:05      Sunset:  5:05:09           
  413.  
  414. ˇ  Module       Time  Function  Mode                                    Event 
  415. ˇ  ---------------------------------------------------------------------------
  416.  
  417. ˇ  (A3) BEDROOM_LIGHT
  418. ˇ             1:30 am     OFF                                           ( 54) 
  419. ˇ            10:34 pm     ON                                            ( 53) 
  420.  
  421. ˇ  (A4) FAMILY_ROOM_LAMP
  422. ˇ            12:30 am     OFF                                           ( 43) 
  423. ˇ             4:05 pm     ON                                            ( 51) 
  424.  
  425. ˇ  (A6) OUTSIDE_PORCH_LIGHTS
  426. ˇ             5:05 pm     DIM                                           ( 48) 
  427. ˇ             5:22 pm     DIM                                           ( 70) 
  428. ˇ            10:40 pm     OFF                                           ( 55) 
  429.  
  430. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  431.  
  432. pause
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  440. ˇ Clock Synchronization
  441. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  442.  
  443. ˇ XA can keep the internal clocks of your PC and CP-290 accurate to within 
  444. ˇ 1 second of each other. You can set either clock based on the time 
  445. ˇ maintained by the other clock. 
  446.  
  447. ˇ If your PC does not have on-board clock, you can set its time based on the
  448. ˇ time maintained by the CP-290. Simply put the following statement in your
  449. ˇ AUTOEXEC.BAT file:
  450.  
  451. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  452. ˇ      XA "SYNCHRONIZE PC"        
  453. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  454.  
  455. ˇ To get both clocks accurate to within 1 second:
  456. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  457.  
  458. ˇ      XA "SYNCHRONIZE PC EXACT"        
  459. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  460.  
  461. ˇ  You can also set the CP-290 based on your PC's internal clock. 
  462.  
  463. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  464. ˇ      XA "SYNCHRONIZE X10"        
  465. ˇ      XA "SYNCHRONIZE X10 EXACT"        
  466. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  467.  
  468. pause
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  479. ˇ Monitoring and Logging CP-290 Activity
  480. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  481.  
  482. ˇ XA can monitor all activity reported by the CP-290. For instance, when
  483. ˇ the CP-290 triggers an scheduled event, or when one of the buttons on 
  484. ˇ the CP-290 console is pressed, XA captures the action and displays the
  485. ˇ activity on your screen.  XA can also log this information in a file
  486. ˇ if requested:
  487.  
  488. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  489. ˇ  C:\> XA "MONITOR"
  490.  
  491. ˇ  Monitor events. Press <ESC> when finished...
  492.  
  493. ˇ     Sat Jan 01  2:16:02 1994 (D1...D16) ALL UNITS OFF
  494. ˇ     Sat Jan 01  3:00:02 1994 (C1) COMPUTER ON 
  495. ˇ     Sat Jan 01 16:02:02 1994 (A4) FAMILY_ROOM_LAMP ON
  496. ˇ     Sat Jan 01 16:02:05 1994 (A8) LIVING_ROOM_LAMP ON
  497. ˇ     Sat Jan 01 17:16:02 1994 (A9) PORCH ON
  498. ˇ     Sat Jan 01 18:00:02 1994 (C8) KATHRYNS_PC OFF
  499. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  500.  
  501. pause
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  513. ˇ Powerup Utility
  514. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  515.  
  516. ˇ A utility program called POWERUP.EXE is supplied with XA which assists 
  517. ˇ you in performing unattended, automatic, event downloads to the CP-290.
  518. ˇ As long as your PC is controlled by an Appliance Module, you can have
  519. ˇ the CP-290 boot your computer at some predetermined time (for instance,
  520. ˇ Sunday mornings @ 3:00 am). Your AUTOEXEC.BAT file can call POWERUP which
  521. ˇ determines if its the proper time to perform a schedule update.
  522.  
  523. ˇ Here are the statements required in AUTOEXEC.BAT to perform automatic 
  524. ˇ schedule updates:
  525.  
  526. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  527. ˇ        :
  528. ˇ   POWERUP d=SUN s=2:55 e=3:05 
  529. ˇ   if not errorlevel 1 goto skip
  530. ˇ   XA f=XA.CMD
  531. ˇ   XA "PC OFF"
  532. ˇ   :skip
  533. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  534.  
  535. pause
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  546. ˇ Registration Benefits
  547. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  548.  
  549. ˇ When you register your copy of XA, you will be sent a floppy disk which
  550. ˇ enables the following items:
  551. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  552.  
  553. ˇ   * IF / ELSE / ENDIF Statements
  554. ˇ   * Logical, Boolean, and Arithmetic operators
  555. ˇ   * Pre-defined variables (CDAY, CDATE, and CTIME)
  556. ˇ   * Interaction with I/O ports (ex. joystick) to send X10 commands. 
  557. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  558.  
  559. ˇ These additions allow you to write specialized script and event files.
  560. ˇ The next few screens will give you some ideas.
  561.  
  562.  
  563.  
  564. pause
  565. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577. DISPLAY OFF VIDEO6 WHITE BLACK DISPLAY ON
  578. ˇ IF / ELSE / ENDIF 
  579. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  580.  
  581. ˇ These constructs allow you to alter the flow of execution within your 
  582. ˇ event command file or script file based on conditions you program.
  583. ˇ In addition, XA allows you to customize the color of the conditional 
  584. ˇ statements so you can easily tell how the statement was evaluated. 
  585. ˇ For instance, assuming today is Sunday, you can have XA test the CDAY 
  586. ˇ variable and if it's the WEEKEND have XA parse a special WEEKEND 
  587. ˇ event file. Note that the IF test is TRUE so it is displayed in
  588. ˇ GREEN colors, the ELSE is FALSE, so it is displayed in RED:
  589. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  590.  
  591.  
  592. DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
  593. ˇ      IF ((CDAY == SAT) OR (CDAY == SUN))
  594. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  595. ˇ        XACMD WEEKEND.CMD
  596. DISPLAY OFF VIDEO6 RED BLACK DISPLAY ON
  597. ˇ      ELSE
  598. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  599. ˇ        XACMD WEEKDAY.CMD
  600. DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
  601. ˇ      ENDIF
  602.  
  603. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  604.  
  605.  
  606.  
  607. pause  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  616. ˇ Input and Output from a Port
  617. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  618.  
  619. ˇ XA allows you to use your joystick port, LPT port, or any other port
  620. ˇ as a general purpose Input/Output port.  Connect switches and/or
  621. ˇ relays to these ports and program XA to react to real-world events.
  622. ˇ The following code appears in the included file JOYSTICK.CMD:
  623. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  624.  
  625. ˇ  :LOOP                                   # This is the beginning of the loop
  626. ˇ     GAME = INPORT 201H                   # Read the joystick port
  627. ˇ     IF !(GAME & 20H)                     # Check Button A
  628. ˇ       IF (MODULE == OFF)                 # If module is currently Off...
  629. ˇ         c2 on fast                       # ...Turn module C2 On
  630. ˇ         MODULE = ON                      # ...update status of module to On
  631. ˇ       ENDIF
  632. ˇ     ENDIF
  633.  
  634. ˇ     IF !(GAME & 10H)                     # Check Button B
  635. ˇ       IF (MODULE == ON)                  # If module is currently On...
  636. ˇ         c2 off fast                      # ...Turn module C2 Off
  637. ˇ         MODULE = OFF                     # ...update its status too
  638. ˇ       ENDIF
  639. ˇ     ENDIF
  640. ˇ  GOTO LOOP                               # Loop until <ESC> pressed.
  641. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  642. pause  
  643.  
  644.  
  645.  
  646.  
  647.   
  648.  
  649. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  650. ˇ Now it's your turn
  651. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  652.  
  653. ˇ This is just a sample of what XA can do with your CP-290.  Please take
  654. ˇ the time to read the accompanying User's Guide to learn all of XA's
  655. ˇ capabilities.  
  656.  
  657. ˇ XA is SHAREWARE. If you continue to use XA beyond the 45 trial period, 
  658. ˇ you need to register this package with the author. Registration brings
  659. ˇ additional benefits including very powerful programming constructs, and
  660. ˇ a printed User's Guide.  
  661.  
  662. ˇ Thank you for trying XA!  Send any correspondence to:
  663.  
  664. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  665. ˇ Bruce Christensen                       CompuServe    :  73201,1531
  666. ˇ 6594 Hudson Ave.                        Prodigy       :  MHNC39A
  667. ˇ Mentor, OH. 44060-4545                  America OnLine:  AuggieBen
  668.  
  669. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  670.  
  671. pause
  672.